#pragma once

class Loader : public Singleton<Loader>
{
	ui32 m_models[3][3];
	Mutex m_adtLock;
	ui32 m_mapId;
public:
	Loader() { memset(m_models, 0, 36); }
	void SetAdt(i32 ofsX, i32 ofsY, ui32 model)
	{
		if(abs(ofsX) > 1 || abs(ofsY) > 1)
			return;
		ui32 relOfsX = 1 + ofsX;
		ui32 relOfsY = 1 + ofsY;
		m_adtLock.Acquire();
		m_models[relOfsX][relOfsY] = model;
		m_adtLock.Release();
	}

	void Update(float x, float y, float z);
	void LoadAdt(ui32 indexX, ui32 indexY);
	void SetMapId(ui32 id) { m_mapId = id; }
};